#ifndef TCPFILE_H
#define TCPFILE_H

#include <QObject>
#include <QtNetwork>
#include "tcpserver.h"
#include "filethread.h"

class TcpFile : public TcpServer
{
    Q_OBJECT
public:
    TcpFile(quint16 port);
    ~TcpFile();
    QString getHostIP();
    int startTCP();
    QString findSID(QString token);
    QMap<QString, FileThread *> threadMap;

protected:

private slots:
    void file_slot_connected(QString socketID);

signals:

private:
    TcpServer *tcpServer;
    QList<QTcpSocket *> socketList;
    QString hostIP;
    quint16 tcpPort;
};

#endif // TCPFILE_H
